package com.zust.java.dao.imp;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.zust.java.bean.ProcessorView;
import com.zust.java.dao.ProcessorViewDao;
import com.zust.java.util.StmtCode;
import com.zust.java.util.StmtMap;

@Repository
public class ProcessorViewDaoImp implements ProcessorViewDao {

	@Autowired
	private SqlSession session;
	private String stmt = null;
	
	public boolean insert(Object obj) {
		return false;
	}

	public boolean delete(Object obj) {
		return false;
	}

	public boolean update(Object obj) {
		return false;
	}

	public List<Object> select(Object obj) {
		if (obj instanceof ProcessorView) {
			ProcessorView o = (ProcessorView) obj;
			stmt = StmtMap.getStmt(StmtCode.SELECT_BY_USERNAME);
			return session.selectList(stmt, o.getUsername());
		}
		return null;
	}

}
